package com.gregbugaj.reflector.test;

import static org.junit.Assert.*;

import java.util.Date;

import org.junit.*;

import com.gregbugaj.jsfconsole.converters.Converter;
import com.gregbugaj.jsfconsole.converters.ConverterRegistry;
import com.gregbugaj.jsfconsole.converters.DateConverter;


public class ConverterTester {

	@Test
	public void registryNonNullConverter() {
		ConverterRegistry reg=new ConverterRegistry();
		Converter converter=reg.lookup(Date.class);
		assertNotNull(converter);
	}

	@Test
	public void registyDateConverter() {
		ConverterRegistry reg=new ConverterRegistry();
		reg.register(new DateConverter());
		Converter converter=reg.lookup(Date.class);
		assertTrue(converter.getClass() ==  DateConverter.class);
	}
}
